<template>
  <nav class="navbar">
    <router-link to="/index" class="nav-link">   首页推荐   </router-link>
    <router-link to="/login" class="nav-link">   用户登录   </router-link>
    <router-link to="/upload" class="nav-link">   上传文章   </router-link>
    <router-link to="/category" class="nav-link">   热门领域   </router-link>
    <router-link to="/personal" class="nav-link">   我的博客   </router-link>
  </nav>
    <router-view />
    <!--  todo 通过前端路由跳转界面之后，添加过场动画 -->
</template>

<style scoped>
#app {
  font-family: "HarmonyOS Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}


.nav-link {
  font-size: 18px;
  font-weight: bold;
  color: #000000;
  text-decoration: none;
  margin: 0 15px;
  padding: 10px 20px;
  border-radius: 6px;
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.nav-link:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.navbar .nav-link:not(:last-child)::after {
  content: "|";
  margin-left: 15px;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
  }

  .nav-link {
    margin-bottom: 10px;
  }

  .navbar .nav-link:not(:last-child)::after {
    content: "";
  }
}

.fade-enter-active, .fade-leave-active {
  transition: opacity 0.5s ease;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}
.input-with-select .el-input-group__prepend {
  background-color: var(--el-fill-color-blank);
}
</style>


<script setup>
import { ref } from 'vue'
import { Search } from '@element-plus/icons-vue'

const input3 = ref('')
const select = ref('')
</script>
